import { createNavigationContainerRef } from '@react-navigation/native';

export const navigationRef = createNavigationContainerRef();

export function navigate(name, params) {
  console.log('I M LEAVING:  5');
  if (navigationRef.isReady()) {
    console.log('I M LEAVING:  6');
    navigationRef.navigate(name, params);
  }
  console.log('I M LEAVING:  7');
}
